﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using BHXH.Core.IService;

namespace BHXH.Frm.Frm
{
    public partial class FormMain : Form
    {
        public FormMain()
        {
            InitializeComponent();
        }
        public void showControl(System.Windows.Forms.Control obj)
        {
            panel1.Controls.Clear();
            obj.Dock = DockStyle.Fill;
            panel1.Controls.Add(obj);            
            panel1.Controls[obj.Name].Focus();
        }     

        private void ultraToolbarsManager1_ToolClick(object sender, Infragistics.Win.UltraWinToolbars.ToolClickEventArgs e)
        {
            switch (e.Tool.Key)
            {
                case "thongtindonvi":
                    ThongTinDonVi usercontrol_ttdv = new ThongTinDonVi();
                    showControl(usercontrol_ttdv);
                    break;
                case "thongtintaikhoan":
                    ThongTinTaiKhoan usercontrol_tttk = new ThongTinTaiKhoan();
                    showControl(usercontrol_tttk);
                    break;
                case "dangkyBHXHlandau":
                    DangKyBHXH usercontrol_dkbhxh = new DangKyBHXH();
                    showControl(usercontrol_dkbhxh);
                    break;
                case "thubhxh":
                    ThuBHXH usercontrol_thubhxh = new ThuBHXH();
                    showControl(usercontrol_thubhxh);
                    break;
            }
        }

        private void FormMain_FormClosing(object sender, FormClosingEventArgs e)
        {
           
        }

    }
}
